package org.mics.organization.request;

import java.io.Serializable;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import org.mics.organization.enums.DepartmentState;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 部门
 * @author mics
 * @date 2023-9-22
 * @version  1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "创建部门请求")
public class DepartmentRequst implements Serializable{
	
  	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 4828160668493684420L;
	
	@Schema(description = "部门id(新增不传修改传)")
	private String id;
	
	@Schema(description = "部门名称",required = true)
  	@Size(min=2,max = 32,message = "部门最大长度2-32位")
	@NotBlank(message = "部门名称不能为空")
	private String name;
    
  	@Schema(description = "上级部门id")
    private String parentId;
    
  	@Schema(description = "公司id")
    private String companyId;
  	
  	@Schema(description = "负责人")
  	@Size(min = 2,max = 32,message = "负责人长度2-32位")
    private String manager;
    
  	@Schema(description = "负责人电话")
  	@Size(min = 11,max = 11,message = "负责人电话长度11位")
    private String managerMobile;
    
  	@Schema(description = "邮箱")
  	@Email(message = "邮箱格式不正确")
    private String email;
	
  	@Schema(description = "部门状态")
    private DepartmentState departmentState;
}
